package com.wd.mylibrary_my.viewmodel

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.wd.mylibrary_base.bean.HeadPicBean
import com.wd.mylibrary_base.utils.HttpUtils
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import okhttp3.MultipartBody


/**
 * 作者: 邢凌志
 * 时间: 2024/9/19
 * 描述:
 */
class ImageInfoViewModel : ViewModel() {
    var imageInfoData= MutableLiveData<HeadPicBean>()

    fun getImageInfoData(userId:Int, sessionId:String, image: MultipartBody.Part){
        viewModelScope.launch(Dispatchers.IO) {
            HttpUtils.httpUtils.apiService.getHeadPic(userId,sessionId, image)
        }
    }
}